import { FormSchema } from '/@/components/Table';

export const formSchema2: FormSchema[] = [
  // {
  //   field: 'contractorId',
  //   component: 'ApiSelect',
  //   label: '项目承建商',
  //   colProps: {
  //     span: 12,
  //   },
  //   componentProps({ formModel }) {
  //     return {
  //       allowClear: true,
  //       // api: getContractorInfoListApi,
  //       api: getContractorListApi,
  //       params: {
  //         // projectId: 1,
  //         keyWord: '',
  //       },
  //       resultField: 'records',
  //       labelField: 'value',
  //       valueField: 'key',
  //       // mode: 'multiple',
  //       getPopupContainer: () => document.body,
  //       async onChange(v) {
  //         console.log('v:', v);
  //         // 承建商 getContractorIdList getConstructionTeamInfo
  //         const params = { contractorId: v };
  //         const res = await getContractorIdList(params);
  //         const {
  //           contractorIntroduction,
  //           contractorAddress,
  //           contractorHeadPhone,
  //           contractorHead,
  //           contractorName,
  //         } = res;
  //         formModel.contractorIntroduction = contractorIntroduction;
  //         formModel.contractorAddress = contractorAddress;
  //         formModel.contractorHeadPhone = contractorHeadPhone;
  //         formModel.contractorHead = contractorHead;
  //         formModel.contractorName = contractorName;
  //       },
  //     };
  //   },
  // },

  {
    field: 'contractorName',
    label: '收款方',
    required: true,
    dynamicDisabled: true,
    component: 'Input',
    colProps: {
      span: 24,
    },
  },

  {
    field: 'contractorName1',
    label: '应付金额',
    required: true,
    dynamicDisabled: false,
    component: 'Input',
    colProps: {
      span: 12,
    },
  },
  {
    dynamicDisabled: true,
    slot: 'f3',
    field: 'f3',
    label: '',
    required: false,
    component: 'Input',
    colProps: {
      span: 12,
    },
  },
  // {
  //   field: 'contractorName2',
  //   label: '',
  //   required: true,
  //   dynamicDisabled: true,
  //   component: 'Input',
  //   colProps: {
  //     span: 12,
  //   },
  // },

  {
    dynamicDisabled: true,
    field: 'contractorHead',
    label: '保质金额',
    required: true,
    component: 'Input',
    colProps: {
      span: 24,
    },
  },
  {
    dynamicDisabled: true,
    field: 'contractorHead1',
    label: '项目总金额',
    required: true,
    component: 'Input',
    colProps: {
      span: 24,
    },
  },
  {
    dynamicDisabled: true,
    field: 'contractorHead3',
    label: '预算总金额',
    required: true,
    component: 'Input',
    colProps: {
      span: 24,
    },
  },
];
